package com.bw.kf.lib_base.utlis.http

import com.bw.kf.lib_base.entity.GroupIndexEntity
import com.bw.kf.lib_base.entity.LoginEntity
import com.bw.kf.lib_base.entity.LookCarBannerEntity
import com.bw.kf.lib_base.entity.LookCarEntity
import com.bw.kf.lib_base.entity.PlayCartInfoEntity
import com.bw.kf.lib_base.entity.PlayCartTopNavigationInfoEntity
import com.bw.kf.lib_base.entity.Res
import com.bw.kf.lib_base.entity.SearchTitleEntity
import com.bw.kf.lib_base.entity.SendCodeEntity
import com.bw.kf.lib_base.entity.TieCommentEntity
import com.bw.kf.lib_base.entity.TieDeatilEntity
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

interface ApiService {
    @POST(Count.LOGIN)
    suspend fun Login(@Body body: RequestBody): LoginEntity

    @GET(Count.PLAY_CART_TOP_NAVIGATION_INFO)
    suspend fun getPlayCartTopNavigationInfo(): Res<MutableList<PlayCartTopNavigationInfoEntity>>

    @GET(Count.PLAY_CART_INFO)
    suspend fun getPlayCartInfo(
        @Query("isFocus") isFocus: String,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int,
        @Query("sortType") sortType: String
    ):Res<PlayCartInfoEntity>
    @GET(Count.PLAY_CART_INFO)
    suspend fun getPlayCartInfosearch(
        @Query("isFocus") isFocus: String,
        @Query("keyword") keyword: String,
        @Query("pageNum") pageNum: Int,
        @Query("pageSize") pageSize: Int,
        @Query("sortType") sortType: String
    ):Res<PlayCartInfoEntity>
    @POST(Count.SEND_LOGIN_CODE)
    suspend fun sendLoginCode(@Query("operatorType") operatorType: String,@Query("phone") phone: String): SendCodeEntity
    @POST(Count.LOGIN)
    suspend fun LoginCode(@Body body: RequestBody):LoginEntity

    @POST(Count.Wang_Send)
    suspend fun Wang_Send(@Query("operatorType")operatorType:String,@Query("phone") phone: String):SendCodeEntity

    @POST(Count.resetPwd)
    suspend fun resetPwd(@Body body: RequestBody):SendCodeEntity

    @POST(Count.resetNewPwd)
    suspend fun resetNewPwd(@Body body: RequestBody):SendCodeEntity

    @GET("/app/postsInfo/getByPostsId")
    suspend fun getPostDetail(@Query("postsId")postsId:String): TieDeatilEntity

    @GET("/app/postsComment/pageComment")
    suspend fun getTieComment(@Query("pageNum")pageNum:Int,@Query("pageSize")pageSize:Int,@Query("postsId")postsId:String): TieCommentEntity
    @GET(Count.search)
    suspend fun getSearchTitle(): SearchTitleEntity
    @GET("/mall/mallHome/cMallGroupList")
    suspend fun getGroupList():Res<MutableList<LookCarEntity>>
    @GET("/mall/mallHome/cmallBannerInfo")
    suspend fun getBannerList(): LookCarBannerEntity
    @GET("/mall/mallHome/mallGroupIndexList")
    suspend fun getGroupIndexList(): GroupIndexEntity

}